From 4f1a574abf73eb36ae62249920dd64704ebf9b14 Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Fri, 1 Sep 2006 12:12:43 -0400 Subject: [PATCH] [POWERPC][XEN] Adjust DEC correctly If DEC would have expired we now restore DEC to 0 so it will fire. The Domain loses info about how late DEC was from looking at DEC but I don't think anyone tracks that. Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- xen/arch/powerpc/powerpc64/domain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/powerpc/powerpc64/domain.c b/xen/arch/powerpc/powerpc64/domain.c index 4b205f969e..a6473348c3 100644 --- a/xen/arch/powerpc/powerpc64/domain.c +++ b/xen/arch/powerpc/powerpc64/domain.c @@ -55,7 +55,10 @@ void load_sprs(struct vcpu *v) /* adjust the DEC value to account for cycles while not * running this OS */ timebase_delta = mftb() - v->arch.timebase; - v->arch.dec -= timebase_delta; + if (timebase_delta > v->arch.dec) + v->arch.dec = 0; + else + v->arch.dec -= timebase_delta; } /* XXX evaluate all isyncs in segment code */ -- 2.30.2